// DlgEditLink.cpp : implementation file
//

#include "stdafx.h"
#include "Celsus.h"
#include "DlgEditLink.h"
#include "afxdialogex.h"


// CDlgEditLink dialog

IMPLEMENT_DYNAMIC(CDlgEditLink, CDialog)

CDlgEditLink::CDlgEditLink(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgEditLink::IDD, pParent)
	, m_szURL(_T(""))
{

}

CDlgEditLink::~CDlgEditLink()
{
}

void CDlgEditLink::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT_URL, m_szURL);
}


BEGIN_MESSAGE_MAP(CDlgEditLink, CDialog)
	ON_BN_CLICKED(IDC_BUTTON_OPEN_LINK, &CDlgEditLink::OnBnClickedButtonOpenLink)
END_MESSAGE_MAP()


// CDlgEditLink message handlers


void CDlgEditLink::OnBnClickedButtonOpenLink()
{
	// update the data
	UpdateData();

	// open link in browser
	ShellExecute( NULL, _T("open"), m_szURL, NULL, NULL, SW_SHOWNORMAL );
}
